3.3.54 \(\int \frac {(e+f x)^2 \cosh (c+d x)}{a+i a \sinh (c+d x)} \, dx\) [254]

Optimal. Leaf size=106 \[ \frac {i (e+f x)^3}{3 a f}-\frac {2 i (e+f x)^2 \log \left (1+i e^{c+d x}\right )}{a d}-\frac {4 i f (e+f x) \text {PolyLog}\left (2,-i e^{c+d x}\right )}{a d^2}+\frac {4 i f^2 \text {PolyLog}\left (3,-i e^{c+d x}\right )}{a d^3} \]

[Out]

1/3*I*(f*x+e)^3/a/f-2*I*(f*x+e)^2*ln(1+I*exp(d*x+c))/a/d-4*I*f*(f*x+e)*polylog(2,-I*exp(d*x+c))/a/d^2+4*I*f^2*
polylog(3,-I*exp(d*x+c))/a/d^3

________________________________________________________________________________________

Rubi [A]
time = 0.13, antiderivative size = 106, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {5678, 2221, 2611, 2320, 6724} \begin {gather*} \frac {4 i f^2 \text {Li}_3\left (-i e^{c+d x}\right )}{a d^3}-\frac {4 i f (e+f x) \text {Li}_2\left (-i e^{c+d x}\right )}{a d^2}-\frac {2 i (e+f x)^2 \log \left (1+i e^{c+d x}\right )}{a d}+\frac {i (e+f x)^3}{3 a f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((e + f*x)^2*Cosh[c + d*x])/(a + I*a*Sinh[c + d*x]),x]

[Out]

((I/3)*(e + f*x)^3)/(a*f) - ((2*I)*(e + f*x)^2*Log[1 + I*E^(c + d*x)])/(a*d) - ((4*I)*f*(e + f*x)*PolyLog[2, (
-I)*E^(c + d*x)])/(a*d^2) + ((4*I)*f^2*PolyLog[3, (-I)*E^(c + d*x)])/(a*d^3)

Rule 2221

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x]
 - Dist[d*(m/(b*f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2320

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 2611

Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(
f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + b*x)))^n]/(b*c*n*Log[F])), x] + Dist[g*(m/(b*c*n*Log[F])), Int[(f + g*
x)^(m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e, f, g, n}, x] && GtQ[m, 0]

Rule 5678

Int[(Cosh[(c_.) + (d_.)*(x_)]*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_.)*Sinh[(c_.) + (d_.)*(x_)]), x_Symbol] :
> Simp[-(e + f*x)^(m + 1)/(b*f*(m + 1)), x] + Dist[2, Int[(e + f*x)^m*(E^(c + d*x)/(a + b*E^(c + d*x))), x], x
] /; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[m, 0] && EqQ[a^2 + b^2, 0]

Rule 6724

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin {align*} \int \frac {(e+f x)^2 \cosh (c+d x)}{a+i a \sinh (c+d x)} \, dx &=\frac {i (e+f x)^3}{3 a f}+2 \int \frac {e^{c+d x} (e+f x)^2}{a+i a e^{c+d x}} \, dx\\ &=\frac {i (e+f x)^3}{3 a f}-\frac {2 i (e+f x)^2 \log \left (1+i e^{c+d x}\right )}{a d}+\frac {(4 i f) \int (e+f x) \log \left (1+i e^{c+d x}\right ) \, dx}{a d}\\ &=\frac {i (e+f x)^3}{3 a f}-\frac {2 i (e+f x)^2 \log \left (1+i e^{c+d x}\right )}{a d}-\frac {4 i f (e+f x) \text {Li}_2\left (-i e^{c+d x}\right )}{a d^2}+\frac {\left (4 i f^2\right ) \int \text {Li}_2\left (-i e^{c+d x}\right ) \, dx}{a d^2}\\ &=\frac {i (e+f x)^3}{3 a f}-\frac {2 i (e+f x)^2 \log \left (1+i e^{c+d x}\right )}{a d}-\frac {4 i f (e+f x) \text {Li}_2\left (-i e^{c+d x}\right )}{a d^2}+\frac {\left (4 i f^2\right ) \text {Subst}\left (\int \frac {\text {Li}_2(-i x)}{x} \, dx,x,e^{c+d x}\right )}{a d^3}\\ &=\frac {i (e+f x)^3}{3 a f}-\frac {2 i (e+f x)^2 \log \left (1+i e^{c+d x}\right )}{a d}-\frac {4 i f (e+f x) \text {Li}_2\left (-i e^{c+d x}\right )}{a d^2}+\frac {4 i f^2 \text {Li}_3\left (-i e^{c+d x}\right )}{a d^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 94, normalized size = 0.89 \begin {gather*} \frac {i \left (d^2 (e+f x)^2 \left (d (e+f x)-6 f \log \left (1+i e^{c+d x}\right )\right )-12 d f^2 (e+f x) \text {PolyLog}\left (2,-i e^{c+d x}\right )+12 f^3 \text {PolyLog}\left (3,-i e^{c+d x}\right )\right )}{3 a d^3 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((e + f*x)^2*Cosh[c + d*x])/(a + I*a*Sinh[c + d*x]),x]

[Out]

((I/3)*(d^2*(e + f*x)^2*(d*(e + f*x) - 6*f*Log[1 + I*E^(c + d*x)]) - 12*d*f^2*(e + f*x)*PolyLog[2, (-I)*E^(c +
 d*x)] + 12*f^3*PolyLog[3, (-I)*E^(c + d*x)]))/(a*d^3*f)

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 404 vs. \(2 (94 ) = 188\).
time = 1.56, size = 405, normalized size = 3.82

method result size
risch \(\frac {i f e \,x^{2}}{a}-\frac {4 i f c e \ln \left ({\mathrm e}^{d x +c}\right )}{d^{2} a}-\frac {2 i f^{2} c^{2} x}{d^{2} a}-\frac {2 i f^{2} \ln \left (1+i {\mathrm e}^{d x +c}\right ) x^{2}}{d a}-\frac {4 i f e \ln \left (1+i {\mathrm e}^{d x +c}\right ) x}{d a}+\frac {i f^{2} x^{3}}{3 a}-\frac {2 i \ln \left ({\mathrm e}^{d x +c}-i\right ) e^{2}}{d a}-\frac {i e^{3}}{3 a f}+\frac {2 i \ln \left ({\mathrm e}^{d x +c}\right ) e^{2}}{d a}-\frac {i e^{2} x}{a}-\frac {2 i f^{2} c^{2} \ln \left ({\mathrm e}^{d x +c}-i\right )}{d^{3} a}+\frac {4 i f^{2} \polylog \left (3, -i {\mathrm e}^{d x +c}\right )}{a \,d^{3}}+\frac {2 i f^{2} c^{2} \ln \left ({\mathrm e}^{d x +c}\right )}{d^{3} a}+\frac {4 i f e c x}{d a}-\frac {4 i f^{2} \polylog \left (2, -i {\mathrm e}^{d x +c}\right ) x}{d^{2} a}+\frac {2 i f^{2} \ln \left (1+i {\mathrm e}^{d x +c}\right ) c^{2}}{d^{3} a}-\frac {4 i f^{2} c^{3}}{3 d^{3} a}+\frac {4 i f c e \ln \left ({\mathrm e}^{d x +c}-i\right )}{d^{2} a}+\frac {2 i f e \,c^{2}}{d^{2} a}-\frac {4 i f e \polylog \left (2, -i {\mathrm e}^{d x +c}\right )}{d^{2} a}-\frac {4 i f e \ln \left (1+i {\mathrm e}^{d x +c}\right ) c}{d^{2} a}\) \(405\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x+e)^2*cosh(d*x+c)/(a+I*a*sinh(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

I/a*f*e*x^2-4*I/d^2/a*f*e*polylog(2,-I*exp(d*x+c))-4*I/d^2/a*f*c*e*ln(exp(d*x+c))-2*I/d^2/a*f^2*c^2*x-2*I/d/a*
f^2*ln(1+I*exp(d*x+c))*x^2-4*I/d/a*f*e*ln(1+I*exp(d*x+c))*x+1/3*I/a*f^2*x^3-2*I/d/a*ln(exp(d*x+c)-I)*e^2-1/3*I
/a/f*e^3+2*I/d/a*ln(exp(d*x+c))*e^2-I/a*e^2*x-2*I/d^3/a*f^2*c^2*ln(exp(d*x+c)-I)+2*I/d^3/a*f^2*c^2*ln(exp(d*x+
c))+4*I/d/a*f*e*c*x+2*I/d^3/a*f^2*ln(1+I*exp(d*x+c))*c^2+4*I*f^2*polylog(3,-I*exp(d*x+c))/a/d^3-4/3*I/d^3/a*f^
2*c^3+4*I/d^2/a*f*c*e*ln(exp(d*x+c)-I)+2*I/d^2/a*f*e*c^2-4*I/d^2/a*f^2*polylog(2,-I*exp(d*x+c))*x-4*I/d^2/a*f*
e*ln(1+I*exp(d*x+c))*c

________________________________________________________________________________________

Maxima [A]
time = 0.33, size = 166, normalized size = 1.57 \begin {gather*} -\frac {i \, f^{2} x^{3} + 3 i \, f x^{2} e}{3 \, a} - \frac {4 i \, {\left (d x \log \left (i \, e^{\left (d x + c\right )} + 1\right ) + {\rm Li}_2\left (-i \, e^{\left (d x + c\right )}\right )\right )} f e}{a d^{2}} - \frac {i \, e^{2} \log \left (i \, a \sinh \left (d x + c\right ) + a\right )}{a d} - \frac {2 i \, {\left (d^{2} x^{2} \log \left (i \, e^{\left (d x + c\right )} + 1\right ) + 2 \, d x {\rm Li}_2\left (-i \, e^{\left (d x + c\right )}\right ) - 2 \, {\rm Li}_{3}(-i \, e^{\left (d x + c\right )})\right )} f^{2}}{a d^{3}} - \frac {2 \, {\left (-i \, d^{3} f^{2} x^{3} - 3 i \, d^{3} f x^{2} e\right )}}{3 \, a d^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^2*cosh(d*x+c)/(a+I*a*sinh(d*x+c)),x, algorithm="maxima")

[Out]

-1/3*(I*f^2*x^3 + 3*I*f*x^2*e)/a - 4*I*(d*x*log(I*e^(d*x + c) + 1) + dilog(-I*e^(d*x + c)))*f*e/(a*d^2) - I*e^
2*log(I*a*sinh(d*x + c) + a)/(a*d) - 2*I*(d^2*x^2*log(I*e^(d*x + c) + 1) + 2*d*x*dilog(-I*e^(d*x + c)) - 2*pol
ylog(3, -I*e^(d*x + c)))*f^2/(a*d^3) - 2/3*(-I*d^3*f^2*x^3 - 3*I*d^3*f*x^2*e)/(a*d^3)

________________________________________________________________________________________

Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 190 vs. \(2 (89) = 178\).
time = 0.35, size = 190, normalized size = 1.79 \begin {gather*} \frac {i \, d^{3} f^{2} x^{3} + 2 i \, c^{3} f^{2} + 12 i \, f^{2} {\rm polylog}\left (3, -i \, e^{\left (d x + c\right )}\right ) - 12 \, {\left (i \, d f^{2} x + i \, d f e\right )} {\rm Li}_2\left (-i \, e^{\left (d x + c\right )}\right ) - 3 \, {\left (-i \, d^{3} x - 2 i \, c d^{2}\right )} e^{2} - 3 \, {\left (-i \, d^{3} f x^{2} + 2 i \, c^{2} d f\right )} e - 6 \, {\left (i \, c^{2} f^{2} - 2 i \, c d f e + i \, d^{2} e^{2}\right )} \log \left (e^{\left (d x + c\right )} - i\right ) - 6 \, {\left (i \, d^{2} f^{2} x^{2} - i \, c^{2} f^{2} + 2 \, {\left (i \, d^{2} f x + i \, c d f\right )} e\right )} \log \left (i \, e^{\left (d x + c\right )} + 1\right )}{3 \, a d^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^2*cosh(d*x+c)/(a+I*a*sinh(d*x+c)),x, algorithm="fricas")

[Out]

1/3*(I*d^3*f^2*x^3 + 2*I*c^3*f^2 + 12*I*f^2*polylog(3, -I*e^(d*x + c)) - 12*(I*d*f^2*x + I*d*f*e)*dilog(-I*e^(
d*x + c)) - 3*(-I*d^3*x - 2*I*c*d^2)*e^2 - 3*(-I*d^3*f*x^2 + 2*I*c^2*d*f)*e - 6*(I*c^2*f^2 - 2*I*c*d*f*e + I*d
^2*e^2)*log(e^(d*x + c) - I) - 6*(I*d^2*f^2*x^2 - I*c^2*f^2 + 2*(I*d^2*f*x + I*c*d*f)*e)*log(I*e^(d*x + c) + 1
))/(a*d^3)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {i \left (\int \frac {e^{2} \cosh {\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx + \int \frac {f^{2} x^{2} \cosh {\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx + \int \frac {2 e f x \cosh {\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx\right )}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)**2*cosh(d*x+c)/(a+I*a*sinh(d*x+c)),x)

[Out]

-I*(Integral(e**2*cosh(c + d*x)/(sinh(c + d*x) - I), x) + Integral(f**2*x**2*cosh(c + d*x)/(sinh(c + d*x) - I)
, x) + Integral(2*e*f*x*cosh(c + d*x)/(sinh(c + d*x) - I), x))/a

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^2*cosh(d*x+c)/(a+I*a*sinh(d*x+c)),x, algorithm="giac")

[Out]

integrate((f*x + e)^2*cosh(d*x + c)/(I*a*sinh(d*x + c) + a), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\mathrm {cosh}\left (c+d\,x\right )\,{\left (e+f\,x\right )}^2}{a+a\,\mathrm {sinh}\left (c+d\,x\right )\,1{}\mathrm {i}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cosh(c + d*x)*(e + f*x)^2)/(a + a*sinh(c + d*x)*1i),x)

[Out]

int((cosh(c + d*x)*(e + f*x)^2)/(a + a*sinh(c + d*x)*1i), x)

________________________________________________________________________________________